<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>web_win</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>
    <style>
        .header-white{background: #fff !important;color: #252525;}
        .header-white .aui-iconfont,.header-white .aui-pull-left{color: #252525 !important;}
        #jb, .jb{background: white;color:#333333}
        .jb .aui-btn .aui-icon-left{color: #333333}
        .sjqy{background: #FE427B;color: white;}
        .sjqy .aui-btn .aui-icon-left{color: white}
    </style>
</head>
<body>
    <header class="aui-bar aui-bar-nav jb" id="header">
	    <a class="aui-pull-left aui-btn" onclick="closeWin();">
	        <span class="aui-iconfont aui-icon-left"></span>
	    </a>
	    <div class="aui-title" id="title"></div>
        <a class="aui-pull-right aui-btn hide collect" onclick="collect();">管理</a>
	  </header>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript">
    apiready = function(){
        api.parseTapmode();
        var header = $api.byId('header');
        $api.fixStatusBar(header);
        var headerPos = $api.offset(header);
        var body_h = $api.offset($api.dom('body')).h;

        var title = api.pageParam.title || '';
        var other = api.pageParam.other||'';
        $api.text($api.dom('#title'),title);
        if (api.winName =='collect_frm') {
            $('.collect').show();
            $("#header").removeClass('sjqy');
        }else if(api.winName=='ccus_pay_frm'){
            $('#header').addClass('header-white');
            $("#header").removeClass('sjqy');
        }else if(api.winName=='ccus_frm'){
            $('.collect').hide();
            $("#header").addClass('sjqy');
        }else{
            $('.collect').hide();
            $("#header").removeClass('sjqy');
        }
        api.openFrame({
			name : api.winName,
			url : 'widget://html/'+api.winName+'.html',
			bounces : false,
            pageParam: api.pageParam,
			rect : {
				x : 0,
				y : headerPos.h,
				w: 'auto',
            	h: 'auto'
			}
            ,allowEdit:true
		});
    };
    function collect(){
        api.execScript({
            name: 'collect_frm',
            frameName: 'collect_frm',
            script: 'check();'
        });
    }
</script>
</html>
